// Levels.h: interface for the CLevels class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LEVELS_H__FBFEAA13_2407_48BC_9E0B_5E6F83C18DCF__INCLUDED_)
#define AFX_LEVELS_H__FBFEAA13_2407_48BC_9E0B_5E6F83C18DCF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CLevels  
{
public:
	BYTE * combineRGB(BYTE *R, BYTE *G, BYTE *B, int size);
	void calcMSE(double *src1, double *src2, int count, double &MSE);
	bool MSE2PSNR(double &MSE, double &PSNR);
	double * compressLevelRatio(double *src, int newcount);
	double * applyLevels(double *src, int input_low, double alpha, int input_high, int output_low, int output_high);
	double * convCount2Permil(int *count);
	int * makeLevelTable(int input_low, double alpha, int input_high, int output_low, int output_high);
	int * getLevelsCount(BYTE *image, int size, int clusterCount=256);
	BYTE * extractElement(BYTE *image, int size, int type);
	CLevels();
	virtual ~CLevels();

	static const double maxvalue;
};

#endif // !defined(AFX_LEVELS_H__FBFEAA13_2407_48BC_9E0B_5E6F83C18DCF__INCLUDED_)
